//@import '@/style/imports';

.goods-buy-panel {
  $self: &;
  position: fixed;
  z-index: $z-index-modal;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate3D(0, 110%, 0);
  &__active {
    transform: translate3D(0, 0, 0);
    #{$self}__overlay {
      opacity: 1;
    }
    #{$self}__wrap {
      opacity: 1;
      visibility: visible;
      transform: translate3D(0, 0, 0);
      transition-delay: 0s;
    }
  }
  &__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(#000, 0.3);
    opacity: 0;
    z-index: $z-index-modal - 1;
    transition: all 0.15s ease-in;
  }
  &__wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    max-height: 90%;
    overflow-y: scroll;
    background: #fff;
    padding: 40px 0 0;
    box-sizing: border-box;
    visibility: hidden;
    transform: translate3D(0, 110%, 0);
    transition: visibility 0s linear 0.15s, all 0.15s ease-out;
    z-index: $z-index-modal;
  }
  &__hd {
    position: relative;
    padding: 0;
    padding-left: 206px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
  }
  &__bd {
    // @include hairline(rgba($color-gray-light, 0.5), top, bottom);
    padding: 50px 30px;
  }
  &__ft {
    padding: 0;
  }
  &__btns {
    display: flex;
    align-items: center;
    overflow: hidden;
    .is-disabled {
      opacity: 0.6;
      color: $color-brand-primary-text !important;
    }
  }
  &__btn {
    font-size: $font-size;
    flex: 1;
    height: $toolbar-height;
    line-height: $toolbar-height;
    text-align: center;
    color: $color-brand-primary-text;
    border: none;
    border-radius: 0;
    font-weight: bold;
    &:before,
    &:after {
      display: none;
      border: none;
    }
  }
  .btn-add-cart,
  .btn-add-cart {
    background: $color-brand-primary;
  }

  .at-icon-close {
    position: absolute;
    right: $edge-size - 8px;
    top: $edge-size - 8px;
    color: $color-gray;
    z-index: 10;
    padding: 16px;
  }

  .goods-img {
    width: 140px;
    height: 140px;
    box-shadow: 0 0 0 1px $color-border-gray;
    &__wrap {
      background: #fff;
      position: absolute;
      top: 0;
      // padding: 8px;
      // margin: -100px 0 0 (-296px + $edge-size - 8px);
      margin: 0 0 0 -176px;
    }
  }

  .goods-sku {
    padding: 8px 0 0;
    &__info {
      color: $color-gray;
      font-size: $font-size-small;
    }
    .price {
      margin: 0 0 15px -2px;
      font-size: $font-size-large;
    }
    &__price {
      display: flex;
      margin-bottom: 10px;
    }
    &__limit {
      margin-top: 10px;
      font-size: $font-size-small;
    }
    &__stock {
      padding-right: 10px;
      font-size: $font-size-small;
    }
    &__props {
      display: block;
      line-height: 1;
      &-label {
        font-size: 28px;
        font-weight: bold;
        color: #000;
        margin-right: 16px;
      }
    }
  }

  .promotions {
    padding: $edge-size;
    &__item {
      &-tag {
        padding: 0 10px;
        margin-right: 10px;
        color: $color-price;
        box-shadow: 0 0 0 1px $color-price;
        border-radius: 6px;
        display: inline-block;
        vertical-align: middle;
        font-size: 20px;
      }

      &-title {
        margin-bottom: 10px;
        vertical-align: middle;
        font-size: 26px;
      }
    }
  }

  .sku-item {
    height: 60px;
    line-height: 60px;
    white-space: nowrap;
    font-size: $font-size-small;
    border: 1px solid #eeeeee;
    padding: 0 $edge-size;
    margin: 0 15px 15px 0;
    display: inline-block;
    white-space: nowrap;
    &.is-active {
      color: $color-brand-primary;
      border-color: $color-brand-primary;
    }
    &.is-disabled {
      opacity: 0.5;
      border: 1px dashed #eee;
    }
    &__group {
      padding: floor($edge-size / 2) 0;
      &-hd {
        line-height: 1;
        margin: 0 0 $edge-size;
        display: block;
        font-size: $font-size-small;
      }
      &-bd {
      }
    }
  }

  .goods-quantity {
    &__wrap {
      padding: $edge-size 0;
    }
    &__hd {
      line-height: 1;
      font-size: $font-size-small;
      margin: 0 0 $edge-size;
      display: block;
    }
  }
}
